package proyecto.modelo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the empleado_rol database table.
 * 
 */
@Embeddable
public class EmpleadoRolPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int rol_in_idRol;

	private int empleadocp_in_codND;

    public EmpleadoRolPK() {
    }
	public int getRol_in_idRol() {
		return this.rol_in_idRol;
	}
	public void setRol_in_idRol(int rol_in_idRol) {
		this.rol_in_idRol = rol_in_idRol;
	}
	public int getEmpleadocp_in_codND() {
		return this.empleadocp_in_codND;
	}
	public void setEmpleadocp_in_codND(int empleadocp_in_codND) {
		this.empleadocp_in_codND = empleadocp_in_codND;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EmpleadoRolPK)) {
			return false;
		}
		EmpleadoRolPK castOther = (EmpleadoRolPK)other;
		return 
			(this.rol_in_idRol == castOther.rol_in_idRol)
			&& (this.empleadocp_in_codND == castOther.empleadocp_in_codND);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.rol_in_idRol;
		hash = hash * prime + this.empleadocp_in_codND;
		
		return hash;
    }
}